// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addVisitor POST /api/visitor/add */
export async function addVisitorUsingPost(
  body: API.VisitorAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/visitor/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteVisitor POST /api/visitor/delete */
export async function deleteVisitorUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/visitor/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getVisitorById GET /api/visitor/get */
export async function getVisitorByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getVisitorByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseVisitorVO>('/api/visitor/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listVisitor GET /api/visitor/list */
export async function listVisitorUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listVisitorUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListVisitorVO>('/api/visitor/list', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listVisitorByPage GET /api/visitor/list/page */
export async function listVisitorByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listVisitorByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageVisitorVO>('/api/visitor/list/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** updateVisitor POST /api/visitor/update */
export async function updateVisitorUsingPost(
  body: API.VisitorUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/visitor/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
